package com.oneguy;

import com.oneguy.model.bean.*;
import com.oneguy.model.service.DailyDataService;
import com.oneguy.model.service.FishService;
import com.oneguy.model.service.SystemStatusInfoService;
import com.oneguy.model.service.UserService;

import java.util.List;

/**
 * Created by ZuoShu on 16/12/8.
 */
public class Query {
    private static final String TAG = "QUERY";
    private SystemStatusInfoService systemService;

    private FishService fishService;

    private DailyDataService dailyDataService;

    private UserService userService;

    private static Query instance;

    private Query() {
    }

    public static synchronized Query getInstance() {
        if (instance == null) {
            instance = new Query();
        }
        return instance;
    }

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    public SystemStatusInfoService getSystemService() {
        return systemService;
    }

    public void setSystemService(SystemStatusInfoService systemService) {
        this.systemService = systemService;
    }

    public FishService getFishService() {
        return fishService;
    }

    public void setFishService(FishService fishService) {
        this.fishService = fishService;
    }

    public DailyDataService getDailyDataService() {
        return dailyDataService;
    }

    public void setDailyDataService(DailyDataService dailyDataService) {
        this.dailyDataService = dailyDataService;
    }

    public List<FishScore> queryFishScore() {
        return fishService.queryFishScore();
    }

    public FishTodaySum queryFishTodaySum() {
        Log.i(TAG, "QUERYING:queryFishTodaySum ");
        return fishService.queryFishTodaySum();
    }

    public List<RegisterCount> queryRegisterCount() {
        Log.i(TAG, "QUERYING:queryRegisterCount ");
        return dailyDataService.queryRegisterCount();
    }

    public List<PayScore> queryPayScore() {
        Log.i(TAG, "QUERYING:queryPayScore ");
        return dailyDataService.queryPayScore();
    }

    public String queryOnlineCount() {
        Log.i(TAG, "QUERYING:queryOnlineCount ");
        return dailyDataService.queryOnlineCount();
    }

    public List<RevenueScore> queryRevenue() {
        Log.i(TAG, "QUERYING:queryRevenue ");
        return dailyDataService.queryRevenue();
    }

    public List<MaxOnline> queryMaxOnline() {
        Log.i(TAG, "QUERYING:queryMaxOnline ");
        return dailyDataService.queryMaxOnline();
    }

    public List<ActiveUser> queryActiveUser() {
        Log.i(TAG, "QUERYING:queryActiveUser ");
        return dailyDataService.queryActiveUser();
    }

    public List<OnlineDetail> queryOnlineDetail() {
        Log.i(TAG, "QUERYING:queryOnlineDetail ");
        return dailyDataService.queryOnlineDetail();
    }

    public List<ActiveUserDetail> queryActiveUserDetail() {
        Log.i(TAG, "QUERYING:queryActiveUserDetail ");
        return dailyDataService.queryActiveUserDetail();
    }

    public List<UserTransfer> queryUserTransfer(int id) {
        Log.i(TAG, "QUERYING:queryUserTransfer " + id);
        return userService.queryUserTransfer(id);
    }

    public List<UserTransferDetail> queryUserTransferOutDetail(int id) {
        Log.i(TAG, "QUERYING:queryUserTransferOutDetail " + id);
        return userService.queryUserTransferOutDetail(id);
    }

    public List<UserTransferDetail> queryUserTransferInDetail(int id) {
        Log.i(TAG, "QUERYING:queryUserTransferInDetail " + id);
        return userService.queryUserTransferInDetail(id);
    }

    public FishOnlineSum queryFishOnlineSum() {
        Log.i(TAG, "QUERYING:queryFishOnlineSum ");
        return fishService.queryFishOnlineSum();
    }
}
